<%@page contentType="text/html"%>
<%@page pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core"  prefix="c"%>
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>员工工资及业绩</title>
	<meta name="renderer" content="webkit">	
	<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">	
	<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">	
	<meta name="apple-mobile-web-app-status-bar-style" content="black">	
	<meta name="apple-mobile-web-app-capable" content="yes">	
	<meta name="format-detection" content="telephone=no">	
	<link rel="stylesheet" href="/bsc/js/common/bootstrap/css/bootstrap.min.css">
<link rel="stylesheet" href="/bsc/js/common/bootstrap/css/bootstrap-theme.min.css">
<script src="/bsc/js/common/bootstrap/js/jquery-3.1.1.min.js"></script>
<script src="/bsc/js/common/bootstrap/js/bootstrap.min.js"></script>
</head>
<body>
<section class="layui-larry-box">

	<form class="form-inline" role="form" action="/bsc/proltal/zn1/listuser" method="post">
	
            <blockquote class="layui-elem-quote news_search">
      
  <div class="form-group">
     <table border="0">
     <tr>
     <td style="padding-right:5px">手工费:</td><td style="padding-right:100px">${bo.mp }</td>
     </tr>
      <tr>
     <td >现金收入:</td><td>${bo.ci }</td>
     </tr>
      <tr>
   <td>消耗收入:</td><td>${bo.ei }</td>
     </tr>
     </table>
  </div>
       <div class="form-group">
      统计月份:
    <input type="month" class="form-control" name="ptime"  value="${map.ptime }" id="ptime" >
  </div>
  <div class="form-group">
      姓名:
    <input type="text" class="form-control" name="username"  value="${map.username }" id="username" >
  </div>
  <button type="submit"   class="btn btn-primary">查询</button>
   <button type="button"  class="btn btn-primary" onclick="cz()">重置</button>
     <button id="export" type="button" class="btn btn-primary" ><span class="glyphicon glyphicon-pencil"></span>导出Excel</button>
	</blockquote>
            
		         <!-- 操作日志 -->
                <div class="layui-form news_list">
                    <table class="layui-table" id="tab" >
					    <colgroup>
						<col width="9%">
						<col width="9%">
						<col width="9%">
						<col width="9%">
						<col width="9%">
						<col width="9%">
						<col width="9%">
						<col width="15%">
					</colgroup>
					<thead>
						<tr>
							<td style="text-align:left;">编号</td>
							<td>姓名</td>
							<td>职位</td>
							<td>手工费</td>
							<td>现金收入</td>
							<td>消耗收入</td>
						</tr>
					</thead>
					<tbody class="news_content"  id="tb">
						<c:forEach items="${info.list }" var="bo" varStatus="s">
						<tr>
							<td align="left">${s.index+1 }</td>
 							<td>${ bo.username }</td> 
							<td>${bo.post_name }</td>
							<td>${bo.mp}</td> 
							<td>${bo.ci}</td>
							<td>${bo.ei}</td>
						</tr>
						</c:forEach>
					</tbody>
					</table>
                     
		</div>
		<div class="layui-inline">
  <a href="javascript:;" class="layui-btn layui-btn-normal" onclick="up()">上一页</a>   <a class="layui-btn layui-btn-normal" href="javascript:;" onclick="next()" >下一页</a>
</div>
		
	  </form> 
	

</section>

<script type="text/javascript">
  $(function(){
	  $('#export').click(function(){
			var trNum=$("#tab").find("tr").length ;//获取表格行数
			var tdNum=$("#tab").find("tr:eq(0)").find("td").length;//获取表格列数
			var arr="";
			for(i=0;i<trNum;i++){
				var str="";
				for(j=0;j<tdNum;j++){
					var info=$("#tab tr:eq("+i+") td:eq("+j+")").text();
					str=str+info+",";
				}
				str=str.substring(0,str.length-1);
				arr=arr+str+"%26";
			}
			window.location.href="/bsc/proltal/zn1/export?arr="+arr;
	});
	  
	
	  
  });
  
  




//上一页
function up(){
	document.forms[0].action="/bsc/proltal/zn1/listuser?page="+${info.prePage};
	document.forms[0].submit();
};
//下一页
function next(){
	document.forms[0].action="/bsc/proltal/zn1/listuser?page="+${info.nextPage};
	document.forms[0].submit();
};
//重置
function cz(){
	$("#ptime").val("");
	$("#username").val("");
} 

</script>
</body>
</html>